/**
 * Bakalarska prace - Inteligentni budik
 * @package sleepCatcher
 * @file SCSleepData.h
 * @author Jan Pesava - xpesav00
 * @email xpesav00@stud.fit.vutbr.cz
 * @date 24. 12. 2011
 */

#ifndef SCSLEEPDATA_H_
#define SCSLEEPDATA_H_

#include "models/SCBaseModel.h"

class SCSample : public SCBaseModel
{

// Construct
public:
	SCSample();
	SCSample(int id);
	virtual ~SCSample();
	result Construct();

// Constants
public:
	static const int SLEEP_ACCELEROMETER_DATA = 200;
	static const int SLEEP_SOUND_DATA = 201;

// Attributes
private:
	int type;
	int sessionId;
	DateTime time;
	float energy;
	float windowEnergy;
	float xAxis;
	float yAxis;
	float zAxis;
	float soundValue;

// Methods
public:
	int GetType();
	void SetType(int type);
	int GetSessionId();
	void SetSessionId(int id);
	DateTime GetTime();
	void SetTime(DateTime time);
	float GetEnergy();
	void SetEnergy(float energy);
	float GetWindowEnergy();
	void SetWindowEnergy(float energy);
	float GetXaxis();
	void SetXaxis(float value);
	float GetYaxis();
	void SetYaxis(float value);
	float GetZaxis();
	void SetZaxis(float value);
	float GetSoundValue();
	void SetSoundValue(float value);
	void Compute();
	float GetAbs(float value);
	void SetDefaultValues();
	bool Load();
	bool Save();

// Statics
public:
	static void Delete(int id);
};

#endif /* SCSLEEPDATA_H_ */
